From 885501e136377c1620f185d91f6a8b9eae234176 Mon Sep 17 00:00:00 2001 From: Mikael Brockman Date: Thu, 1 Sep 2016 18:53:45 +0300 Subject: [PATCH] doc: mention feature toggling in "Specifying deps" --- src/doc/specifying-dependencies.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/doc/specifying-dependencies.md b/src/doc/specifying-dependencies.md index 15873c310..c7b95fdac 100644 --- a/src/doc/specifying-dependencies.md +++ b/src/doc/specifying-dependencies.md @@ -391,3 +391,19 @@ unless listed under the `dependencies` section as well. A package itself and its build script are built separately, so their dependencies need not coincide. Cargo is kept simpler and cleaner by using independent dependencies for independent purposes. + +# Choosing features + +If a package you depend on offers conditional features, you can +specify which to use: + +```toml +[dependencies.awesome] +version = "1.3.5" +default-features = false # do not include the default features, and optionally + # cherry-pick individual features +features = ["secure-password", "civet"] +``` + +More information about features can be found in the +[manifest documentation](manifest.html#the-features-section). -- 2.30.2